package com.chey.dao;

import com.chey.pojo.META;
import com.chey.pojo.ckls.CKLS;
import com.chey.pojo.ckls.CNTR;
import com.chey.pojo.ckls.DFLT;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author JanYao
 * @version 0.1
 */

public interface CklsDao {
    @Select("insert into META(META_ID,SENDER,RECEIVER,SEQUENCE,DTIME,MTYPE,STYPE) values(#{uuid},#{meta.sender},#{meta.receiver},#{meta.sequence},#{meta.dTime},#{meta.bType},#{meta.sType})")
    public Integer addMeta(@Param("uuid") String uuid,@Param("meta") META meta);

    @Insert("insert into MSG_DFME_CKLS values(#{dflt.FLID}, #{dflt.FFID}, #{dflt.FIDE}, #{dflt.FATT},#{ckls.FCES}, #{ckls.FCEE}, #{ckls.FCRS}, #{ckls.FCRE}, #{ckls.MCES}, #{ckls.MCEE}, #{ckls.MCRS}, #{ckls.MCRE}, #{ckls.FCDP}, #{ckls.MCDP},#{uuid},#{uuid})")
    Integer addCkls(@Param("uuid") String uuid, @Param("dflt")DFLT dflt, @Param("ckls") CKLS ckls);

    @Insert("insert into DFME_CKLS_CNTR values(#{cntr.CKNO}, #{cntr.ID}, #{cntr.CODE}, #{cntr.CKAT}, #{cntr.TYPE}, #{cntr.CCAR}, #{cntr.ESTR}, #{cntr.EEND}, #{cntr.RSTR}, #{cntr.REND}, #{cntr.BTSC},#{uuid})")
    Integer addCntr(@Param("uuid") String uuid,@Param("cntr") CNTR cntr);
}
